Add DB method for getting amount of data to sync.

3 jobs for !1452 with 2013-db-method-for-amount-of-data-to-sync in 9 minutes and 14 seconds (queued for 6 minutes and 6 seconds)
latest merge request