SALINAS, Calif. -

A former high school drug counselor accused of filming students having sex in his office pleaded no contest Tuesday in Monterey County to all 56 counts against him.

Gilbert Olivares, 36, was arrested in 2012. At the time, he was an employee of Sunrise House who was deployed as an onsite drug and alcohol counselor at Salinas High School.

The charges include committing lewd acts against children, the possession and manufacturing of child pornography, and communicating with minors for a lewd purpose.

Prosecutors said he secretly taped students having sex in his office and molested four male youths.

The sister of a 14-year-old male discovered sexually explicit communications on her brother's Facebook account between him and Olivares in March 2012. She contacted Salinas police, who executed a search warrant at Olivares' residence. They found hundreds of images of child pornography on his computer and sexually explicit texts between Olivares and Salinas High School students on his cellphone. They also found 13 video files of students engaging in sex acts in his office at the high school.

According to prosecutors, Olivares had set up his phone video recorder in his office. He would then call a male student and a female student out of their class and direct them to enter his office. Olivares would next leave the office, and the students would engage in sexual acts while being unknowingly recorded.

Olivares is expected to receive a sentence of 16 years in prison on May 28. He'll also be ordered to register as a sex offender for life.