How can I determine the sample size according to Brookmeyer? So determine the number of cases for median time to event. How can I define the equation for N?
There is no single equation for the number of cases, N. With even a few cases you can get an estimate of the median survival--it just might not be a very good estimate.
Say you have 3 cases all with known event times. Put them into increasing time order. The middle event time is an estimate of the median survival time. The problem: there is 1 chance in 4 that all 3 event times are either all above or all below the true median, as each case has probability 1/2 of being on one particular side of the true median. Thus there's a good chance that the entire range of your 3 event times has completely missed the true median.
So the question isn't just how to "determine the number of cases for median time to event." It's how to determine the number of cases needed to estimate the median time to event with a desired level of precision. The level of precision is typically taken to be the width of the desired confidence interval.
If you aren't assuming any particular distribution of event times, then you need a non-parametric estimate of that confidence interval. That's what Brookmeyer and Crowley provide in the situation with right-censored event times. It's simplest, however, to start with all cases having events and then see what changes when censoring comes into play.
This answer shows how to get a non-parametric estimate from the order statistics of a sample, the rank-order numbers of the observations. You put the event times into increasing order, and use the properties of the binomial distribution to set the upper and lower limits of the (time-ordered) case numbers that provide the desired confidence for containing the true median. Then the event-time values corresponding to those cases give you the confidence interval for the median estimate.
As Frank Harrell says in comments, those non-parametric confidence intervals can be pretty wide. In the first example under "Discussion" in the answer linked above, if you have 10 ordered event times then the times between the 3rd and the 8th case only gives you an 89% confidence interval even though that interval includes 6 of your 10 events. If you took multiple samples of N = 10, all with events, and used the 3rd and 8th event times as the confidence interval for the median, you would still miss the true median in 11% of those samples. For the larger sample sizes needed to get better precision, you can use the normal approximation to the binomial distribution.
Brookmeyer and Crowley extend this type of analysis to a situation where some event times are right censored. In that situation, those censored cases provides information that helps reduce the variance of the median estimate and the corresponding confidence-interval width. Just how much the censored cases help, however, depends on the details of the distributions of censoring and event times: each censored case only helps at event times up to its own censoring time. So the relative distribution of events and censorings matters.
That's why, if you can't assume a particular parametric distribution for the event times, you are best off simulating both event times and censoring times under different reasonable assumptions, and then seeing how well the Brookmeyer-Crowley or other non-parametric estimates of median survival work at different sample sizes N. The CRAN survival task view lists many tools for simulating survival data. The simsurv package, for example, can simulate event times from standard distributions or a user-defined distribution; you would then have to impose censoring upon the results.