fix and tests for #469
Merge branch 'wrong_count'
Merge pull request #470 from giastfader/master

fix and tests for #469 (wrong count(*) with permissions)
fixed DocumentCountFunctionalTest for Java 6
Merge pull request #471 from giastfader/master

fixed DocumentCountFunctionalTest for Java 6
Merge pull request #30 from baasbox/master

pull request from repository baasbox, branch pushProfile