Like I said, you can literally count on one hand how many times a sitting president has been to a former First Lady's funeral. And in every case, the president was a friend of the former First Lady or the family.
Zachary Taylor attended Dolley Madison's funeral in 1849 and became the first sitting president to attend a former First Lady's funeral. In his eulogy he gave us the term "first lady" and it's been applied to the wife of every president since. Dolley Madison had the equivalent of a State Funeral, which was attended by President Taylor, the Vide-President, cabinet officers, diplomatic corps, members of the House and Senate, Supreme Court justices, officers of the army and navy, the mayor and city leaders, and citizens and strangers. She was 81 years old, defined the position of the First Lady, and had known and was friends with every president from George Washington to Zachary Taylor.
Teddy Roosevelt attended Julia Grant's funeral 53 years later in 1902. Julia Grant was a fellow Republican and fellow New Yorker whom Roosevelt had known for years.
Teddy Roosevelt also attended the funeral of Ida McKinley in 1907. Roosevelt had been William McKinley's vice president and it was McKinley's assassination in 1901 that had propelled Roosevelt to the White House.
In 1962 JFK attended the funeral of Eleanor Roosevelt at the request of the family. She initially didn't think he should run for president, but after many conversations and correspondence between the two, she warmed up to him and gave him her full support, not only campaigning for him, but giving him advice and pointers on everything from the Nixon TV debate to how the White House works. She was the "First Lady of the World" who served as First Lady during the Great Depression and WWII, and it still to this day the longest serving First Lady. By the time of her death she and JFK had become good friends and she had become a trusted advisor.
Bill Clinton attended Jacqueline Kennedy's burial service because he was a longtime friend of the family, and was asked to deliver the eulogy at the burial.
Clinton did not actually attend the funeral service earlier in the day. But if you count the eulogy at the burial, then he makes the fifth president to attend a former First Lady's funeral. Either way, 5 fingers or 4, one hand is all ya need to count them.