Add EntityRepository->countBy() method to complement findBy()

It would be reasonable to add the method to ObjectRepository interface, but I might not be aware of all its implementations that will become broken
Merge remote-tracking branch 'origin'

Conflicts:
	lib/Doctrine/ORM/EntityRepository.php
	tests/Doctrine/Tests/ORM/Functional/EntityRepositoryTest.php
	tests/Doctrine/Tests/ORM/Functional/SingleTableInheritanceTest.php
	tests/Doctrine/Tests/ORM/Functional/TypeTest.php