fixed bug where count was wrong for expanded resources