A CD4 count is mostly used to check the health of your immune system if you are infected with HIV (human immunodeficiency virus). HIV attacks and destroys CD4 cells. Without treatment, HIV may destroy so many CD4 cells that your immune system will have trouble fighting off infections.