Thanks guys. The solution is even simpler (I have realized it after reading an answer above):
int count = getAdapter().getCount();
The reason is that ListAdapter interface the return of getAdapter()
call is inhereted from Adapter interface which has declared getCount()
method already.