DATAJPA-409 - Added unit test for count query creation for nested references.