Twelve pipes are connected to a Cistern. Some of them are inlet pipes and the others are outlet pipes. Each of the inlet pipes can fill the tank in 8 hours and each of the outlet pipes can empty the cistern completely in 6 hours. If all the pipes are kept open, the empty tank gets filled in 24 hours. How many inlet pipes are there?