getTotalCount() public static method

Get total count of documents.
public static getTotalCount ( array $config = [] ) : integer
$config array
return integer count
 /** Returns the total number of documents matching the given condition
  *  GET http://[YOUR-DOMAIN]/webservice/rest/asset-count?apikey=[API-KEY]&condition=type%3D%27folder%27
  *
  * Parameters:
  *      - condition
  *      - group by key
  */
 public function documentCountAction()
 {
     $this->checkUserPermission("documents");
     $condition = urldecode($this->getParam("condition"));
     $groupBy = $this->getParam("groupBy");
     $params = array();
     if (!empty($condition)) {
         $params["condition"] = $condition;
     }
     if (!empty($groupBy)) {
         $params["groupBy"] = $groupBy;
     }
     $count = Document::getTotalCount($params);
     $this->encoder->encode(array("success" => true, "data" => array("totalCount" => $count)));
 }