Merge pull request #712 from ahilles107/fix_performance

Fix performance
Fixes WOBS-3298
Merge pull request #715 from terwey/WOBS-3298

Fixes WOBS-3298
fix countByUser function queries