Cleanup of Deps.getCount() code