select count(*) from counters where ref is not null