It may mean either that you are about to die or that you will run out of time for something (for example, a contract or a job).
to have the days numbered - to be about to finish a thing-