try this one out with a subselect:
em.createQuery("SELECT count(a) FROM AnswerEntity a WHERE a.choice.choiceID = :p "
+ "AND a.userId IN "
+ "(SELECT us.userId FROM UserState us WHERE us.state = com.company.model.UserVotingState.DONE)");
Also keep in mind to set fully qualified class name for your Enum.