Fix performance issues in JModelLegacy::_getListCount() #1532

Merged
merged 3 commits into from Sep 16, 2012