# Sorting a result

**URL:** <https://community.wolfram.com/t/sorting-a-result/953>\
**Category:** Questions\
**Tags:** mathematica\
**Created:** [November 23, 2013, 5:12pm UTC](https://community.wolfram.com/t/sorting-a-result/953 "2013-11-23T17:12:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fizixx](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/fizixx/32/21362_2.png) [@fizixx](https://community.wolfram.com/u/fizixx)\
**Post date:** [November 23, 2013, 5:12pm UTC](https://community.wolfram.com/t/sorting-a-result/953/1 "2013-11-23T17:12:26Z")

</div>

If I have input and output like the following:

 ![Image2.jpg](https://global.discourse-cdn.com/wolfram/original/2X/5/565afa063628b2efda9eecdd2b9786c56ea03f7a.jpeg)

How could I format the result into alphabetical order, and count the number of items?

Thanks

---

<div class="post-metadata">

**Author:** ![nma](https://avatars.discourse-cdn.com/v4/letter/n/b5e925/32.png) [@nma](https://community.wolfram.com/u/nma)\
**Post date:** [November 23, 2013, 6:15pm UTC](https://community.wolfram.com/t/sorting-a-result/953/2 "2013-11-23T18:15:03Z")

</div>

```auto
r = AstronomicalData["Jupiter", "Satellites"];
Sort[r]
Length[r]

```

To make a small table

```auto
r = Sort[r];
TableForm[Table[{i, r[[i]]}, {i, Length[r]}]]

```

 ![1454Untitled.png](https://global.discourse-cdn.com/wolfram/original/2X/7/7dda51527dae5c0411b630b75b1333dac1cecd92.png)

---

<div class="post-metadata">

**Author:** ![fkampas](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/fkampas/32/41217_2.png) [@fkampas](https://community.wolfram.com/u/fkampas)\
**Post date:** [November 23, 2013, 6:16pm UTC](https://community.wolfram.com/t/sorting-a-result/953/3 "2013-11-23T18:16:57Z")

</div>

```auto
Sort[AstronomicalData["Jupiter", "Satellites"]]

```

```auto
Length[%]

```

---

<div class="post-metadata">

**Author:** ![fizixx](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/fizixx/32/21362_2.png) [@fizixx](https://community.wolfram.com/u/fizixx)\
**Post date:** [November 23, 2013, 8:09pm UTC](https://community.wolfram.com/t/sorting-a-result/953/4 "2013-11-23T20:09:38Z")

</div>

Hey, yes, that’s great, thanks!

I was playing with the “Sort[]” function, but I was obviously using it incorrectly, as I was not getting these nice results.

Thanks again!
