Chip sales are hardly the only source that analysts use. The firms that have been in business a long time, also have sources inside factories, shipping companies, and even counting boxes at import warehouses.
Some do exit polls at stores. Some even have their own group of tens of thousands of users, who report what they buy and use, for years on end. (They don't show immediate sales data, but are great for showing long term trends and shifts in device popularity.)
It depends on which analyst firm you're talking about, and what kind of measurements they specialize in. For example:
- Surveys of buyers. For example, Kantar Worldpanel.
- Units currently in use. For example comScore and Nielsen survey data.
- Units sold to the channel. For example sales reported by companies such as Apple. Also IDCs estimates for phone units sold.
- Units sold to end users. For example NPD or GfK data of retail transactions. Also Gartners estimates for phone units sold.
Apple's top executives often quote IDC, Kantar and others during their quarterly revenue calls.