fix for displaying statistics
Revert "fix for displaying statistics"

This reverts commit 0e261401254336f5a44687f992d72faa545b8502.
fix spelling mistake
fix for displaying statistics
fixed error in query
added counts
debug output
fix query finally
remove debug information