[API] Count in local library

I know there is a search function in API, but is there a more effective way to get the amount of tracks in local library? More effective means without retrieving all information.