title: Spring Data Rest and count queries
body: <p>I was experimenting few lines of code using Spring Data Rest. I cannot find anything for sending via REST a simple request to count all records for a specific entity. </p>
  
  <p>Suppose I have the following entity: </p>
  
  <pre><code>import javax.persistence.Entity;
  import javax.persistence.GeneratedValue;
  import javax.persistence.GenerationType;
  import javax.persistence.Id;
  
  @Entity
  public class Person {
  
      @Id
      @GeneratedValue(strategy = GenerationType.AUTO)
      private long id;
  
      private String firstName;
      private String lastName;
  
      public String getFirstName() {
          return firstName;
      }
  
      public void setFirstName(String firstName) {
          this.firstName = firstName;
      }
  
      public String getLastName() {
          return lastName;
      }
  
      public void setLastName(String lastName) {
          this.lastName = lastName;
      }
  }
  </code></pre>
  
  <p>which shall be accessed with the following repository:</p>
  
  <pre><code>import java.util.List;
  
  import org.springframework.data.repository.PagingAndSortingRepository;
  import org.springframework.data.repository.query.Param;
  import org.springframework.data.rest.core.annotation.RepositoryRestResource;
  
  @RepositoryRestResource(collectionResourceRel = "people", path = "people")
  public interface PersonRepository extends PagingAndSortingRepository&lt;Person, Long&gt; {
  }
  </code></pre>
  
  <p>Is there a way for knowing with REST how many <code>Person</code> entity are saved in my database, no condition specified? </p>