/**
  * get new notifications count
  * @param  array $p containing fromId property
  * @return json  response
  */
 public function getNewCount($p)
 {
     $rez = array('success' => true, 'count' => 0);
     $this->prepareParams($p);
     $fromId = empty($p['fromId']) ? false : intval($p['fromId']);
     $rez['count'] = DM\Notifications::getCount(User::getId(), $fromId);
     return $rez;
 }