The phone number has nothing to do with it. If there is a spying app installed on the phone, the phone number is immaterial. If the carrier is locating the phone using tower triangulation, they know the phone number - after all, it is connected through them.