[bugfix] fn:count() reports wrong dependency

fn:count should check its argument for dependencies.