How can I track cancelled and refunded orders for a specific customer?

Topic summary

  • Request for help finding or writing code to count a specific customer’s cancelled and refunded orders in a Shopify store.
  • Seeks confirmation of feasibility and implementation guidance within the theme/customization context (tags: customizations, design, shopify-themes).
  • No technical details, constraints, or code samples provided by the requester.
  • No responses or solutions yet; the question remains open and unresolved.
Summarized with AI on January 15. AI used: gpt-5.

Hello, I need a code that count the cancelled orders and also the refunded orders of a specific customer, is it possible? Can you help me please?

Thank you