add form query mapper and entity count method to entityRepository