The abundance of (not just) dark matter haloes