title: In MySQL, get number of pregnant women who received 3 ANC checkups
body: <p>I am working on a project where it is required to find out the total number of pregnant women who have received 3 ANC(Ante-Natal Care) checkups done.</p>
  
  <p>A pregnant women is said to receive 3 ANC checkups if any 3 of the 4 columns(visit1_date,visit2_date,visit3_date and visit4_date) have some value.</p>
  
  <p>For this, I need to calculate the count of number of rows where any 3 of 4 columns given in the table are not null.</p>
  
  <p>So, basically, what is required is to find a count of all rows where any three of</p>
  
  <p>visit1_date, visit2_date,visit3_date,visit4_date are NOT NULL</p>
  
  <p>My table has columns individually for each of the visit dates</p>
  
  <p>I have tried using IFNULL, but I have no idea if this would help.</p>