The number of groups the IRS granted tax-exempt status rose between 2005 and 2016 as the number of groups it determined were not eligible declined.