Use getSingleResult() e converta o resultado para o tipo desejado.
int num = ((Number) entityManager.createNativeQuery("select count(*) from your_table").getSingleResult()).intValue();
Use getSingleResult() e converta o resultado para o tipo desejado.
int num = ((Number) entityManager.createNativeQuery("select count(*) from your_table").getSingleResult()).intValue();