Fix calculation of direct entries count.
Will re-calculate the direct entries count in each save to avoid
situation where two saves are made simultaneously causing race condition
and wrong value save to the DB.
Merge pull request #1190 from kaltura/IX-9.15.0-SUP-814

Fix calculation of direct entries count.